const ReduxTypeCache: { [label: string]: boolean } = {};
export function ReduxType<T>(label: T | ''): T {
  if (ReduxTypeCache[<string>label]) {
    throw new Error(`Action type "${label}" is not unique"`);
  }

  ReduxTypeCache[<string>label] = true;

  return <T>label;
}
